﻿using Shop.Data.Entities;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//Erwin Guerra mamani

namespace Shop.Data.Mapping
{
    public class UsuarioMapping : EntityTypeConfiguration<Usuario>
    {
        public UsuarioMapping() {
            ToTable("Usuario");
            HasKey(t => t.Id);
            Property(t => t.Id)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);

            Property(t => t.login).IsRequired();
            Property(t => t.password).IsOptional();
            Property(t => t.nombre).IsOptional();
            Property(t => t.rol).IsOptional();


        
        }
    }
}
